// 作业题：抽象类与多接口实现
// 定义：
// ● 抽象类 Employee，包含抽象方法 getSalary(): number
// ● 接口 Identifiable，包含属性 id: number
// ● 接口 Department，包含属性 department: string
// 创建类 Engineer 继承 Employee 并实现 Identifiable 和 Department：
// ● 属性：id, name, department, hourlyRate, hoursWorked
// ● 实现 getSalary()：返回 hourlyRate * hoursWorked
// 实例化 Engineer 并打印其 id、department 和 salary。
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Employee = /** @class */ (function () {
    function Employee() {
    }
    return Employee;
}());
var Engineer = /** @class */ (function (_super) {
    __extends(Engineer, _super);
    function Engineer(id, name, department, hourlyRate, hoursWorked) {
        var _this = _super.call(this) || this;
        _this.id = id;
        _this.name = name;
        _this.department = department;
        _this.hourlyRate = hourlyRate;
        _this.hoursWorked = hoursWorked;
        return _this;
    }
    Engineer.prototype.getSalary = function () {
        return this.hourlyRate * this.hoursWorked;
    };
    return Engineer;
}(Employee));
var engineer = new Engineer(1, "张三", "开发", 20, 40);
console.log(engineer.id);
console.log(engineer.department);
console.log(engineer.getSalary());
